

from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet
from goods.models import SpecificationOption,SPUSpecification
from meiduo_admin.serializers.option_serializers import *
from meiduo_admin.custom_paginations import MyPage



class OptSpecView(ListAPIView):
    queryset = SPUSpecification.objects.all()
    serializer_class = SpecOptSimpleModelSerializer



class OptionViewSet(ModelViewSet):
    queryset = SpecificationOption.objects.all()
    serializer_class = OptionModelSerializer
    pagination_class = MyPage